﻿
	using System; 
	using System.Collections;
	using System.Collections.Generic ;
	using System.Runtime.Serialization;

namespace UFIDA.U9.Cust.U9Demo.DeliverBE
{
	/// <summary>
	/// 送货单 缺省DTO 
	/// 
	/// </summary>
	[DataContract(Name = "UFIDA.U9.Cust.U9Demo.DeliverBE.DeliveryData", Namespace = "http://www.UFIDA.org/EntityData",IsReference=true)]	
	[Serializable]
    [KnownType("GetKnownTypes")]
	public partial class DeliveryData : UFIDA.U9.Base.Doc.DocData
	{

	    public static IList<Type> GetKnownTypes()
        {
            IList<Type> knownTypes = new List<Type>();
                            knownTypes.Add(typeof(UFIDA.U9.Cust.U9Demo.DeliverBE.DocTypeData));
                        
                                        knownTypes.Add(typeof(UFIDA.U9.Base.Organization.OrganizationData));
                                        knownTypes.Add(typeof(UFIDA.U9.CBO.HR.Operator.OperatorsData));
                                        knownTypes.Add(typeof(UFIDA.U9.Base.Currency.CurrencyData));
                        
                                        knownTypes.Add(typeof(List<UFIDA.U9.Cust.U9Demo.DeliverBE.DeliveryLineData>));
                                        knownTypes.Add(typeof(UFIDA.U9.CBO.SCM.Supplier.SupplierData));
            
                knownTypes.Add(typeof(UFSoft.UBF.Util.Data.MultiLangDataDict));
            return knownTypes;
        }
		/// <summary>
		/// Default Constructor
		/// </summary>
		public DeliveryData()
		{
			initData() ;
		}
		private void initData()
		{
			//设置默认值
	     			
	     							Status= 0; 			     			
	     			
	     			
	     			
	     			
	     			


			//设置组合的集合属性为List<>对象. -目前直接在属性上处理.
			
			//调用默认值初始化服务进行配置方式初始化
			UFSoft.UBF.Service.DTOService.InitConfigDefault(this);
		}		
		[System.Runtime.Serialization.OnDeserializing]
        internal void OnDeserializing(System.Runtime.Serialization.StreamingContext context)
        {
			 initData();
        }
        
		#region System Fields
		///<summary>
		/// 实体类型. 
		/// </summary>
		[DataMember(IsRequired=false)]
		public override string SysEntityType
		{
			get { return "UFIDA.U9.Cust.U9Demo.DeliverBE.Delivery" ;}
		}
		#endregion


		
		#region Properties Inner Component
	        					/// <summary>
		/// 状态
		/// 送货单.Misc.状态
		/// </summary>
		[DataMember(IsRequired=false)]
		private System.Int32 m_status;
		public System.Int32 Status
		{
			get	
			{	
				return m_status ;
			}
			set	
			{	
				m_status = value ;
			}
		}		

			        					/// <summary>
		/// 送货单行
		/// 送货单.Misc.送货单行
		/// </summary>
		[DataMember(IsRequired=false)]
		private List<UFIDA.U9.Cust.U9Demo.DeliverBE.DeliveryLineData> m_deliveryLine;
		public List<UFIDA.U9.Cust.U9Demo.DeliverBE.DeliveryLineData> DeliveryLine
		{
			get	
			{	
				if (m_deliveryLine == null)
				{
					List<UFIDA.U9.Cust.U9Demo.DeliverBE.DeliveryLineData> m_list = new List<UFIDA.U9.Cust.U9Demo.DeliverBE.DeliveryLineData>() ;
					m_deliveryLine = m_list;
				}
				return m_deliveryLine ;
			}
			set	
			{	
				m_deliveryLine = value ;
			}
		}		

			
		#endregion	

		#region Properties Outer Component
		
		
		private UFSoft.UBF.Business.BusinessEntity.EntityKey m_documentType_SKey ;
		/// <summary>
		/// 单据类型 序列化Key属性。（传递跨组织序列列字段）
		/// 送货单.Misc.单据类型
		/// </summary>
		[DataMember(IsRequired=false)]
		public UFSoft.UBF.Business.BusinessEntity.EntityKey DocumentType_SKey
		{
			get 
			{
				return m_documentType_SKey ;					
			}
			set
			{
				 m_documentType_SKey = value ;	
			}
		}
		/// <summary>
		/// 单据类型
		/// 送货单.Misc.单据类型
		/// </summary>
		[DataMember(IsRequired=false)]
		public System.Int64 DocumentType
		{
			get	
			{	
				if (DocumentType_SKey == null)
					return UFSoft.UBF.Business.Entity.EmptyObjectValue ;
				else
					return DocumentType_SKey.ID ;
			}
			set	
			{	
				if (value == 0 || value == UFSoft.UBF.Business.Entity.EmptyObjectValue )
					DocumentType_SKey = null ;
				else
				{
					if (DocumentType_SKey == null )
						DocumentType_SKey = new UFSoft.UBF.Business.BusinessEntity.EntityKey(value,"UFIDA.U9.Cust.U9Demo.DeliverBE.DocType") ;
					else
						DocumentType_SKey.ID = value ;
				}
			}
		}
		

		
		private UFSoft.UBF.Business.BusinessEntity.EntityKey m_ownOrg_SKey ;
		/// <summary>
		/// 送货组织 序列化Key属性。（传递跨组织序列列字段）
		/// 送货单.Misc.送货组织
		/// </summary>
		[DataMember(IsRequired=false)]
		public UFSoft.UBF.Business.BusinessEntity.EntityKey OwnOrg_SKey
		{
			get 
			{
				return m_ownOrg_SKey ;					
			}
			set
			{
				 m_ownOrg_SKey = value ;	
			}
		}
		/// <summary>
		/// 送货组织
		/// 送货单.Misc.送货组织
		/// </summary>
		[DataMember(IsRequired=false)]
		public System.Int64 OwnOrg
		{
			get	
			{	
				if (OwnOrg_SKey == null)
					return UFSoft.UBF.Business.Entity.EmptyObjectValue ;
				else
					return OwnOrg_SKey.ID ;
			}
			set	
			{	
				if (value == 0 || value == UFSoft.UBF.Business.Entity.EmptyObjectValue )
					OwnOrg_SKey = null ;
				else
				{
					if (OwnOrg_SKey == null )
						OwnOrg_SKey = new UFSoft.UBF.Business.BusinessEntity.EntityKey(value,"UFIDA.U9.Base.Organization.Organization") ;
					else
						OwnOrg_SKey.ID = value ;
				}
			}
		}
		

		
		private UFSoft.UBF.Business.BusinessEntity.EntityKey m_deliver_SKey ;
		/// <summary>
		/// 送货人 序列化Key属性。（传递跨组织序列列字段）
		/// 送货单.Misc.送货人
		/// </summary>
		[DataMember(IsRequired=false)]
		public UFSoft.UBF.Business.BusinessEntity.EntityKey Deliver_SKey
		{
			get 
			{
				return m_deliver_SKey ;					
			}
			set
			{
				 m_deliver_SKey = value ;	
			}
		}
		/// <summary>
		/// 送货人
		/// 送货单.Misc.送货人
		/// </summary>
		[DataMember(IsRequired=false)]
		public System.Int64 Deliver
		{
			get	
			{	
				if (Deliver_SKey == null)
					return UFSoft.UBF.Business.Entity.EmptyObjectValue ;
				else
					return Deliver_SKey.ID ;
			}
			set	
			{	
				if (value == 0 || value == UFSoft.UBF.Business.Entity.EmptyObjectValue )
					Deliver_SKey = null ;
				else
				{
					if (Deliver_SKey == null )
						Deliver_SKey = new UFSoft.UBF.Business.BusinessEntity.EntityKey(value,"UFIDA.U9.CBO.HR.Operator.Operators") ;
					else
						Deliver_SKey.ID = value ;
				}
			}
		}
		

		
		private UFSoft.UBF.Business.BusinessEntity.EntityKey m_currency_SKey ;
		/// <summary>
		/// 币种 序列化Key属性。（传递跨组织序列列字段）
		/// 送货单.Misc.币种
		/// </summary>
		[DataMember(IsRequired=false)]
		public UFSoft.UBF.Business.BusinessEntity.EntityKey Currency_SKey
		{
			get 
			{
				return m_currency_SKey ;					
			}
			set
			{
				 m_currency_SKey = value ;	
			}
		}
		/// <summary>
		/// 币种
		/// 送货单.Misc.币种
		/// </summary>
		[DataMember(IsRequired=false)]
		public System.Int64 Currency
		{
			get	
			{	
				if (Currency_SKey == null)
					return UFSoft.UBF.Business.Entity.EmptyObjectValue ;
				else
					return Currency_SKey.ID ;
			}
			set	
			{	
				if (value == 0 || value == UFSoft.UBF.Business.Entity.EmptyObjectValue )
					Currency_SKey = null ;
				else
				{
					if (Currency_SKey == null )
						Currency_SKey = new UFSoft.UBF.Business.BusinessEntity.EntityKey(value,"UFIDA.U9.Base.Currency.Currency") ;
					else
						Currency_SKey.ID = value ;
				}
			}
		}
		

				/// <summary>
		/// 备注
		/// 送货单.Misc.备注
		/// </summary>
		[DataMember(IsRequired=false)]
		private System.String m_memo ;
		public System.String Memo
		{
			get	
			{	
				return m_memo  ;
			}
			set	
			{	
				m_memo = value ;	
			}
		}
		

		
		private UFSoft.UBF.Business.BusinessEntity.EntityKey m_supplier_SKey ;
		/// <summary>
		/// 供应商 序列化Key属性。（传递跨组织序列列字段）
		/// 送货单.Misc.供应商
		/// </summary>
		[DataMember(IsRequired=false)]
		public UFSoft.UBF.Business.BusinessEntity.EntityKey Supplier_SKey
		{
			get 
			{
				return m_supplier_SKey ;					
			}
			set
			{
				 m_supplier_SKey = value ;	
			}
		}
		/// <summary>
		/// 供应商
		/// 送货单.Misc.供应商
		/// </summary>
		[DataMember(IsRequired=false)]
		public System.Int64 Supplier
		{
			get	
			{	
				if (Supplier_SKey == null)
					return UFSoft.UBF.Business.Entity.EmptyObjectValue ;
				else
					return Supplier_SKey.ID ;
			}
			set	
			{	
				if (value == 0 || value == UFSoft.UBF.Business.Entity.EmptyObjectValue )
					Supplier_SKey = null ;
				else
				{
					if (Supplier_SKey == null )
						Supplier_SKey = new UFSoft.UBF.Business.BusinessEntity.EntityKey(value,"UFIDA.U9.CBO.SCM.Supplier.Supplier") ;
					else
						Supplier_SKey.ID = value ;
				}
			}
		}
		
		#endregion	

		#region Multi_Fields
								
		#endregion 		
	}	

}

